{extend name="base"/}
 {block name="content"}

<!--头部代码的结束--> 
<!--头部代码的结束-->

<!--子页面banner-->
<div class="gyban"></div>
<!--子页面banner-->

<!--页面导航部分的开始-->
<div class="ym_nav">
   <div class="ym_nr1"><img src="{$logo}" width="133" height="53" /></div>
   <div class="ym_nr2">
      <div class="ym_nrc"  style="width:365px;">
         <ul>
          {volist name="typeson" id="son"}
           <li><a href="{:url('index/about/show',['type_pid'=>$type['type_id'],'wen_id'=>$son.type_id])}">{$son.type_name}</a></li>
          {/volist} 
         </ul>
      </div>
   </div>
</div>

<!--页面导航部分的结束-->

<!--主题内容的开始-->
<div class="ymzt">
     <form action="" id="data_type" method="post">
     <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
       <td align="right">建议留言</td>
       <td>
        <textarea name="lea_text"  id="lea_text" cols="60" rows="4" class="textArea"></textarea>
        <font style="display:none" class="adlea_text" color='red'>留言不能为空！</font>
       </td>
      </tr>
       <tr>
       <td width="80" align="right">邮箱</td>
       <td>
        <input type="text" id="email" name="email" value="" size="40" class="inpMain" />
      <font style="display:none" class="ademail" color='red'>名称不能为空！</font>
       </td>
      </tr>
      <tr>
       <td></td>
       <td>
        <input type="hidden" name="token" value="b9439ae8" />
        <input type="hidden" name="cat_id" value="" />
        <input  class="btn" type="button" onclick='type_add()' value="提交" />
       </td>
      </tr>
     </table>
    </form>
</div>

<!--主题内容的结束-->




<script type="text/javascript">
$(function(){
    $("#lea_text").blur(function(){
    $(".adlea_text").hide();
    })
    $("#email").blur(function(){
    $(".ademail").hide();
    })
})
function type_add(){
var success_url="{:url('index/leaving/index')}";
var url="{:url('index/leaving/leav_add')}";
var admins=$("#data_type").serialize();
//alert(admins);
var lea_text=$("#lea_text").val();


if(lea_text.length<1){
  $(".adlea_text").show();
}else{
  $.post(url,admins,function(result){
   
  if(result.status=='4')
  {
  dialog.success(result.message,success_url);
  }else
  {
    dialog.error(result.message);
  } 
  })
}

}

</script>
{/block}